<ul class="detailContents black">
<?php
$i=1;
if(!empty($articles)) foreach($articles as $item){
    if($i%2==1){
        echo '<li class="chage"><span>'.$item->createtime.
            '</span><a href="'.Yii::app()->createUrl('article/view', array('id'=>$item->aid)).'">'.$item->title.'</a></li>';
    }else{
        echo '<li><span>'.$item->createtime.
            '</span><a href="'.Yii::app()->createUrl('article/view', array('id'=>$item->aid)).'">'.$item->title.'</a></li>';
    }
    $i++;
}
?>
    <div class="clear"></div>
</ul>